const request = require('./request');

module.exports = {
  getInfo: (name = process.env.GRIDSOME_API_GITHUB_NAME) => {
    return request({
      method: 'GET',
      url: '/users/' + name
    });
  },
  followers: (page) => {
    return request({
      method: 'GET',
      url: `/users/${process.env.GRIDSOME_API_GITHUB_NAME}/followers?page=${page}&per_page=100`
    });
  },
  following: () => {
    return request({
      method: 'GET',
      url: `/users/${process.env.GRIDSOME_API_GITHUB_NAME}/following?page=1&per_page=100`
    });
  }
}